import java.io.IOException;
import java.util.Vector;

public class AgentPlatform implements Runnable{
		
	private Vector incoming = new Vector();
	private Vector outgoing = new Vector();
	
	/* constructor */
	public AgentPlatform(){

	}
	
	/**
	 * run method still to be completed
	 */
	public void run(){
		
	}
	
	/* OUTGOING AGENT */
    public void sendAgent(MobileAgent agent) throws IOException {
    	byte[] agentStream = new byte[1500];						/*need to change this value*/
    	agentStream = agent.persist();
    	
    	outgoing.addElement(agentStream);
    }
	
	/* INCOMMING AGENT */
    public void resurrect( byte[] data ) throws IOException {
    	MobileAgent agent = new MobileAgent();   
    	agent.resurrect(data);
    	
    	new Thread( agent ).start();	
	}	
}